﻿<Window x:Class="WPF.DataBinding.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:t="clr-namespace:System.Threading;assembly=mscorlib"
        xmlns:s="clr-namespace:System;assembly=mscorlib"
        Title="MainWindow" Height="350" Width="525">
    <Window.Resources>
        <s:String x:Key="stringVal">Test String</s:String>
    </Window.Resources>
    <Grid>
        <TextBlock HorizontalAlignment="Left" Margin="193,97,0,0" TextWrapping="Wrap" Text="{Binding Path=CurrentCulture, Source={x:Static Member=t:Thread.CurrentThread}}" VerticalAlignment="Top" Name="txtThread"/>
        <!--Binding bindingThread = new Binding("CurrentCulture");
            bindingThread.Source = Thread.CurrentThread;
            txtThread.SetBinding(TextBlock.TextProperty, bindingThread);-->
        <TextBlock HorizontalAlignment="Left" Margin="193,175,0,0" TextWrapping="Wrap" Text="{Binding Source={StaticResource ResourceKey=stringVal}}" VerticalAlignment="Top" Name="txtStaticSource"/>
        <TextBlock HorizontalAlignment="Left" Margin="193,207,0,0" TextWrapping="Wrap" Text="{Binding Path=Length,Source={StaticResource ResourceKey=stringVal}}" VerticalAlignment="Top" Name="txtStaticSourceLenght"/>
    </Grid>
</Window>
